import i18n from '@/utils/i18n'
export const formItems = [
  {
    filed: 'deviceName',
    type: 'input',
    label: i18n.t('message.sbmc')
  },
  {
    filed: 'status',
    type: 'select',
    label: i18n.t('message.sbzt'),
    placeholder: i18n.t('message.qb'),
    options: [
      { value: '0', label: i18n.t('message.jy') },
      { value: '1', label: i18n.t('message.qy') }
    ]
  }
]
export const deviceFormConfig = {
  formItems,
  online: true
}
export const deviceContentConfig = {
  propList: [
    { prop: 'deviceId', label: i18n.t('message.sbId'), minWidth: '150' },
    { prop: 'name', label: i18n.t('message.sbmc'), minWidth: '160' },
    { prop: 'coinNum', label: i18n.t('message.bsysl'), minWidth: '120' },
    { prop: 'createTime', label: i18n.t('message.createTime'), minWidth: '160' },
    { prop: 'connectStatus', label: i18n.t('message.ljzt'), minWidth: i18n.locale === 'ZH' ? '100' : '120', slotName: 'linkStatus', fixed: 'right' },
    { prop: 'status', label: i18n.t('message.sbzt'), minWidth: i18n.locale === 'ZH' ? '80' : '170', slotName: 'status', fixed: 'right' },
    { prop: 'handle', label: i18n.t('message.caozuo'), minWidth: i18n.locale === 'ZH' ? '140' : '320', slotName: 'handler', fixed: 'right', showoverflowtooltip: false }
  ]
}
export const deviceRules = {
  deviceId: [{ required: true, message: i18n.t('message.jy') + i18n.t('message.sbid'), trigger: 'blur' }],
  name: [{ required: true, message: i18n.t('message.jy') + i18n.t('message.sbmc'), trigger: 'blur' }],
  ip: [{ required: true, message: i18n.t('message.jy') + i18n.t('message.sbipdz'), trigger: 'blur' }]
}
